package com.geor.gcv.core.model;

public class SharpArea extends Area {

	/** 左侧切分点 */
	public int[] p1;
	/** 右侧切分点 */
	public int[] p2;

	/** 宽高比例 */
	public float scale;

	/** 是否需要合并 */
	public boolean merged;

	public SharpArea(int x, int y, int width, int height) {
		super(x, y, width, height);
		scale = (float) width / (float) height;
	}

	public boolean isMerged() {
		return merged;
	}

	public void setMerged(boolean merged) {
		this.merged = merged;
	}

	public int[] getP1() {
		return p1;
	}

	public void setP1(int[] p1) {
		this.p1 = p1;
	}

	public void setP1(int x, int y) {
		if (null == this.p1)
			this.p1 = new int[2];
		this.p1[0] = x;
		this.p1[1] = y;
	}

	public int[] getP2() {
		return p2;
	}

	public void setP2(int[] p2) {
		this.p2 = p2;
	}

	public void setP2(int x, int y) {
		if (null == this.p2)
			this.p2 = new int[2];
		this.p2[0] = x;
		this.p2[1] = y;
	}
}